package com.banesco.precargadepositos.interfaz.componentes;

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.XYEdges;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.decor.Border;
import net.rim.device.api.ui.decor.BorderFactory;

public class DialogoBanesco extends Dialog
{
	private static Bitmap _logoBanesco = Bitmap.getBitmapResource("LogoBanesco40px.png");
	
	private int _colorBordeClaro = 0X00ABDF;
	private int _colorBordeOscuro = 0X00497E;
	private int _colorLetra = 0X00466F;
	
	public DialogoBanesco(int type, String mensaje)
	{
		super(type, mensaje, 0, _logoBanesco, Manager.USE_ALL_WIDTH);
		
		XYEdges edges = new XYEdges(2, 2, 2, 2);
		XYEdges colors = new XYEdges(_colorBordeClaro, _colorBordeClaro, _colorBordeClaro, _colorBordeClaro);
		Border bordeTextBox = BorderFactory.createSimpleBorder(edges, colors, Border.STYLE_SOLID);
		this.setBorder(bordeTextBox);
	}
	
	
	public DialogoBanesco(String mensaje, Object[] opciones, int[] valores, int defaultObject)
	{
		super(mensaje, opciones, valores, defaultObject, _logoBanesco, Manager.USE_ALL_WIDTH);
		
		XYEdges edges = new XYEdges(2, 2, 2, 2);
		XYEdges colors = new XYEdges(_colorBordeClaro, _colorBordeClaro, _colorBordeClaro, _colorBordeClaro);
		Border bordeTextBox = BorderFactory.createSimpleBorder(edges, colors, Border.STYLE_SOLID);
		this.setBorder(bordeTextBox);
	}

	
	protected void paint(Graphics g) {
		 
	    g.setColor(Color.WHITE);
	    g.fillRect (-1, -1, this.getWidth()+1, this.getHeight()+1);
	    
	    g.setColor(_colorLetra);

	  super.paint(g);
	 }
		
}

